Add edit and delete functionality for institutions, accounts, categories#4
Merged
caseybecking merged 1 commit intomainfrom Oct 27, 2025
Merged
Conversation
…ies, and transactions Features: - Edit functionality with pre-populated forms for all entities - Delete functionality with confirmation dialogs - Referential integrity checks to prevent orphaned records - Edit modals with dropdowns for related data (institutions, categories, accounts) - Real-time form population via API GET endpoints API Endpoints Added: - GET /api/institution/<id> - Get single institution - PUT /api/institution/<id> - Update institution - DELETE /api/institution/<id> - Delete institution with account check - GET /api/institution/account/<id> - Get single account - PUT /api/institution/account/<id> - Update account with validation - DELETE /api/institution/account/<id> - Delete account with transaction check - GET /api/categories/<id> - Get single category - PUT /api/categories/<id> - Update category with FK validation - DELETE /api/categories/<id> - Delete category with transaction check - GET /api/transaction/<id> - Get single transaction - PUT /api/transaction/<id> - Update transaction with validation - DELETE /api/transaction/<id> - Delete transaction Frontend Changes: - Added Edit and Delete buttons to all data tables - Created edit modals for each entity type - JavaScript functions for edit/update/delete operations - Error handling with user-friendly alerts - Automatic page refresh after successful operations Referential Integrity: - Institutions cannot be deleted if they have linked accounts - Accounts cannot be deleted if they have linked transactions - Categories cannot be deleted if they have linked transactions - Clear error messages indicating number of dependent records Files Modified: - api/institution/controllers.py - Added detail, update, delete endpoints - api/institution_account/controllers.py - Added detail, update, delete endpoints - api/categories/controllers.py - Added detail, update, delete endpoints - api/transaction/controllers.py - Added detail, update, delete endpoints - app/transactions/controllers.py - Fixed endpoint name, added data fetching - app/templates/institution/index.html - Added edit/delete UI - app/templates/institution_account/index.html - Added edit/delete UI - app/templates/categories/index.html - Added edit/delete UI - app/templates/transactions/index.html - Added edit/delete UI - app/static/js/institution/institution.js - Added CRUD functions - app/static/js/institution_account/institution_account.js - Added CRUD functions - app/static/js/categories/categories.js - Added CRUD functions - app/static/js/transactions/transactions.js - Added CRUD functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features:
API Endpoints Added:
Frontend Changes:
Referential Integrity:
Files Modified: